package com.choupin.choupin.entity;

import java.math.BigDecimal;
import java.util.Objects;

public class Lottery extends BaseEntity {

    private   Integer id;//抽奖池id
    private  String name;// 抽奖池名称
    private String image;// 抽奖池图片
    private String instructions;//抽奖池规则说明
    private BigDecimal price;//抽奖池购买单价

    public Lottery() {
    }

    public Lottery(Integer id, String name, String image, String instructions, BigDecimal price) {
        this.id = id;
        this.name = name;
        this.image = image;
        this.instructions = instructions;
        this.price = price;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getInstructions() {
        return instructions;
    }

    public void setInstructions(String instructions) {
        this.instructions = instructions;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Lottery poolList = (Lottery) o;
        return Objects.equals(id, poolList.id) &&
                Objects.equals(name, poolList.name) &&
                Objects.equals(image, poolList.image) &&
                Objects.equals(instructions, poolList.instructions) &&
                Objects.equals(price, poolList.price);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, image, instructions, price);
    }

    @Override
    public String toString() {
        return "PoolList{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", image='" + image + '\'' +
                ", instructions='" + instructions + '\'' +
                ", price=" + price +
                ", createdUser='" + createdUser + '\'' +
                ", createdTime=" + createdTime +
                ", modifiedUser='" + modifiedUser + '\'' +
                ", modifiedTime=" + modifiedTime +
                '}';
    }
}
